<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/include/base.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<table class="table">

	<tr>
		<td>

			<div class="form-group">
				<label for="inputPassword3" class="col-sm-3 control-label">人员ID</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" id="userIdInput" name="id" 
						placeholder="人员ID" value="${user.id }" disabled="disabled">
				</div>
			</div>

		</td>
		<td>

			<div class="form-group">
				<label for="inputPassword3" class="col-sm-3 control-label">人员姓名</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" id="username" name="username"
						placeholder="人员姓名" value="${user.username }">
				</div>
			</div>

		</td>
		<td>
			<div class="form-group">
				<label for="inputPassword3" class="col-sm-3 control-label">密码</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" id="password"
						placeholder="密码" name="password" value="${user.password }">
				</div>
			</div>
		</td>
	</tr>
	<tr>
		<td>
			<div class="form-group" id="deptSelect">
				<label for="inputPassword3" class="col-sm-3 control-label">所属部门</label>
				<div class="col-sm-6">
					<select class="form-control" name="deptId">
						<c:choose>
							<c:when test="${empty depts}">
								<option>${user.department.deptName }</option>
							</c:when>
							<c:otherwise>
								<c:forEach items="${depts }" var="dept">
									<option value="${dept.id }"
										<c:if test="${user.department.id eq dept.id}">selected="selected"</c:if>
									>${dept.deptName }</option>
								</c:forEach>
							</c:otherwise>
						
						</c:choose>
					</select>
				</div>
			</div>
		</td>
		<td>
			<div class="form-group" id="userTypeSelect">
				<label for="inputPassword3" class="col-sm-3 control-label">人员类型</label>
				<div class="col-sm-6">
					<select class="form-control" name="userType">
						
						<c:choose>
							<c:when test="${empty depts}">
								<option > ${user.userType eq 0?"管理员":"普通员工" }</option>
							</c:when>
							<c:otherwise>
								<option value="0"
									<c:if test="${user.userType eq 0}">selected="selected"</c:if>
								>管理员</option>
								<option value="1"
									<c:if test="${user.userType eq 1}">selected="selected"</c:if>
								>普通员工</option>
							</c:otherwise>
						
						</c:choose>
						
					</select>
				</div>
			</div>


		</td>


		<td>

			<div class="form-group">
				<label for="inputPassword3" class="col-sm-3 control-label">传真</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" id="userFax"
						placeholder="传真 " name="userFax" value="${user.userFax }">
				</div>
			</div>

		</td>

	</tr>

	<tr>
		<td>
			<div class="form-group">
				<label for="inputPassword3" class="col-sm-3 control-label">电话</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" id="userTelephone"
						placeholder="电话" name="userTelephone" value="${user.userTelephone }">
				</div>
			</div>

		</td>
		<td>


			<div class="form-group">
				<label for="inputPassword3" class="col-sm-3 control-label">手机</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" id="inputPassword3"
						placeholder="手机" name="userPhone" value="${user.userPhone }">
				</div>
			</div>
		</td>
		<td>

			<div class="form-group">
				<label for="inputPassword3" class="col-sm-3 control-label">邮箱</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" id="inputPassword3"
						placeholder="邮箱" name="userEmail" value="${user.userEmail }">
				</div>
			</div>

		</td>
	</tr>

	<tr>
		<td colspan="3" align="center">
			<div class="form-group">
				<label class="control-label col-sm-1">备注</label>
				<div class="col-sm-10">
					<textarea class="form-control ckeditor" 
					name="userRemark" rows="6" id="userRemark">${user.userRemark }</textarea>
				</div>
			</div>

		</td>

	</tr>



</table>